Notes on the imported HAFAS data
Train types
HAFAS train types are transferred with the following data:
- Train type code (up to 3 digits)
- Product category
- Train type name
List of stops, stop coordinates
Number, name and coordinates of the stations are taken from both files. The code of the transport association in the stop data is transferred to a user-defined attribute of the stops.
For each station, a combination of a node, a stop, a stop area, and a stop point are inserted at a ratio of 1:1:1:1. Name and code are both made up of the HAFAS name. If the HAFAS name contains several alternative names separated by $, only the first name is transferred.
If you import a stop coordinates file only, no names are generated. The coordinates optionally contain the Z-coordinate, indicated as height above sea level in [m]. It is transferred to the Z-coordinate of the node.
Connections between stops
Stop groups (2nd field of information) are turned into stops with several stop areas.
In the process, all stop points positioned to the right of mark „:“ are aggregated below the stop on the left side in case it exists (meta-stops are thus ignored) and if it has not already been assigned in a previous step.
The stops of the stop points to be aggregated are deleted and their stop areas are allocated to the superordinate stop on the left side.
Transition relations (1st field of information) are interpreted in different ways. If there is a transition within a stop (group), the transition time (optionally accurate to the nearest second) is saved to the matrix of transitions between the corresponding stop areas of the stops. The matrix can be asymmetric.
However, if there is a transition between stop points of different stops, a link is created which is open to the PuTWalk type of transport system in the stated direction.
Time shifts of stops
-
Transfer priorities at stops
The number and transfer priority of HAFAS stops is read in from the priority file. They describe the quality of a transfer stop event. The transfer priority is a value between zero and 16, whereby zero represents the highest and 16 the lowest priority. This value is written in the stop area attribute Priority for Transfers. Stops for which no priority was transferred are assigned the default value eight.
Stop-related transfer walk times
The general transfer times between any train types apart from the IC (German express train) are transferred. The transition time is entered at the diagonal item of the transition matrix that corresponds to the specified stop point between the stop areas (of its stop). By default the diagonal is initialized by the value below „9999999“ and then can be overwritten by special values for individual stop points.
Note: If in the HAFAS files no transition time between stop areas is defined, Visum uses as walking time the maximum walk time between the stop areas within the stop. |
Transfer times related to the pair of vehicle journeys
At the respective stop specific transfer walk times are applied on time profile level. Per HAFAS trip number/administrative ID, a specific transfer walk time is set for all the time profiles determined by the line number and operator name during HAFAS import. At the stop of the stop area, a specific transfer walk time from time profile 1 to time profile 2 with the indicated time is inserted.
Timetable period data, valid days of the vehicle journeys
The name of the dataset is stored in the attribute of the network version name and in the network notepad.
The start date and the end date of the timetable period are copied.
If No calendar is set, each section of a vehicle journey section is inserted with the valid day daily. If the Weekly calendar is set, the valid days code is interpreted according to HAFAS’ “modulo 1 week“. If the Annual calendar is set, the valid days code is adopted unchanged apart from the specified range of dates if it is shorter than the timetable period.
Operator data
The number, the abbreviated name and the full name of the operator are transferred. Via the administrative ID an operator number can be assigned to a vehicle journey. If this file is missing, no operators are assigned.
Combined runnings
Combined runnings are transferred as coupled vehicle journeys.
From the pairs (train number, administrative ID) for the two trains the corresponding time profiles are determined. They then can be coupled between the items that correspond to the specified FromStops/ToStops of the coupled section.
Note: Only absolute stop numbers - no indices - are permitted in the combined runnings file. For loop trips and side trips the information is thus not clear. In their case, the first occurrence of the From Stop/To Stop is used and no coupling is inserted if the To Stop is located before the From Stop. |
Passenger trip chains
The passenger trip chain file is used to identify the vehicle journeys of a passenger trip chain via their vehicle journey number and administrative ID. However, this identification code is not unique. Generally, during HAFAS import, several vehicle journeys of the same vehicle journey number and administrative ID are imported, but their valid days are different. From these vehicle journeys, the ones most suited for passenger trip chains are selected.
Only HAFAS passenger trip chains according to Visum are imported that fulfill the following condition:
- The last stop event of vehicle journey 1 and the first stop event of vehicle journey 2 correspond to each other or at least belong to the same stop.
During HAFAS import, above each "stop event - stop event - section" lies exactly one vehicle journey section. If there are a number of incoming or outgoing passenger trip chains, the vehicle journey sections of the previous or currently viewed vehicle journey are duplicated. This leads to a change of the PuT operating indicators, unlike data import without passenger trip chains.
Timetable
The timetable file stores the data for the following issues: Trains (*Z), destination couch journeys (*KW), destination couch trains (*KWZ), prohibited alighting/boarding for destination coaches (*B), regular services (*T), valid days (*A VE), line codes (*L), and line courses. Service trips are ignored when importing.
- Trains (*Z): For each train, a combination of a line, a line route, a time profile and a vehicle journey is created at a ratio of 1:1:1:1. The line name is created based on the settings in the Vehicle journey names tab. The transport system of the line is set to the transport system that you have assigned to the train type (*G) of the train (for more than one row of the highest train type = lowest product category). The line route is always named “1“. The direction is derived from the coordinates of the origin and destination stop. The time profile is always named “1“. The vehicle journey number is assigned consecutively and the vehicle journey name created according to the settings in the Vehicle journey names tab. The operator is determined by the administrative ID and the information from the HAFAS operator data file. The course of the line route and the time profile are constructed according to the information by HAFAS on the course of the train. Since the network does not contain any links initially, links are created step-by-step in between nodes of consecutive stops and opened up to the transport system of the line. If a link already exists, it is opened up to the new transport system only where applicable. Different trains are displayed on the line routes of a sole line if they are given the same line name according to the user-defined formation of names. This way, for example, all trains can be arranged in lines according to their transport system. If the attributes “Headway number” and “Headway time” are indicated, Visum creates several vehicle journeys (and vehicle journey sections) for HAFAS trips.
- *Rows marked *A VE (valid days): For each *row marked A VE a vehicle journey section is inserted. Its valid day is determined in the same way as described above for the timetable period data file. If a Visum valid day with the same bit string already exists, it is re-used; otherwise it is newly created. The ID of a valid day is generated arbitrarily, e.g. the HAFAS valid day number is used. Valid day “daily“ can be clearly identified in HAFAS (000000) and is assigned to the invariably existing Visum valid day daily (ID 1). If the Weekly calendar is set, no valid days with the same content are created, i.e. valid days with an identical “OR projection“ but a deviant HAFAS number might be assigned to a single valid day.
- *Rows marked *L (line ID): If a line ID is available, it is used when generating a line name and vehicle journey name in Visum, where applicable.
- Destination coach (*KW): Section by section, destination coaches are hauled by trains. In Visum, a destination coach is a separate vehicle journey which is coupled section-wise with a pulling vehicle journey. The vehicle journey data is gained from the references to the pulling train. That is why the pulling train data is required prior to the import of destination coaches.
For each destination coach journey, a line route is created and a time profile as well. Also a line is created if a line with the required properties does not yet exist. For the vehicle journey and the line, the names are generated according to the settings in the Destination coach journey names tab. Since a destination coach does not store any administrative management or line or train type data, this data is gained from a train which is listed in the subsequent rows *KWZ. Here you have the choice: Either the first row can be used or the row of top-ranking train. If there are several top-ranking trains, the first one will be regarded. Line routes and time profiles are named similar to those of usual vehicle journeys.
According to row *B, destination coaches can be excluded from boarding/alighting. This information is read into the time profile.
- Route course: Departure and arrival times of value 9999 are interpreted as if boarding and alighting were not permitted. Vehicle journeys indicating 9999 at the From Stop or the To Stop are ignored. A warning is recorded in the log file.
Line information
The optional line file contains various meta information about lines. The import creates lines and main lines.
Real graph: Link points, edges, and vehicle journey allocation
The HAFAS real graph has the property that the coordinates are interpreted as real coordinates. The following files of the real graph can be imported in Visum:
- Link points: The link points are created as nodes of the resulting Visum network if their ID has not already been read in as a stop number. The file can therefore only be read in after the Stop directory and the Stop coordinates. The nodes have an ID and X, Y, and optionally Z-coordinates. Optional height data in HAFAS coordinates are interpreted as height above sea level and are used in Visum.
- Edges: From this file the edges are inserted as links into Visum, whereby an edge can become a whole link polygon. If a B is indicated in the line, the edge applies to both directions. Each link will be opened for all transport systems except the transport system Walk. All implicitly resulting turns will be opened for all transport systems.
Lengths for links are also read in from the file. The line *L indicates the length of the edge in [m]. There are lengths for the entire edge and for each section between successive intermediate nodes. If no length is specified, it is replaced by the direct distance length in the coordinate system.
The *S lines assign a name to an edge. This is copied in Visum into the names of all the links created from the edge. - Vehicle journey allocation: When inserting line routes, the information about passed stops and intermediate points from the file is used and the route course in between is supplemented by shortest path searches with regard to lengths. Routing does not take place over closed links or turns. The calendar day is only checked for plausibility when the data is required for routing.